package com.boil.qz.safekavass.web.request.param;

import com.boil.util.Constants;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;

/**
 * Created by ChenYong on 2017-04-13.
 * <br>
 * 通知列表的请求参数。
 */
public class NoticeListParam extends Page2Param {
    /**
     * 创建人
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_50, message = "创建人的长度在0至50个字之间")
    private String noticeCreatePerson;
    /**
     * 通知标题
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_500, message = "通知标题的长度在0至500个字之间")
    private String noticeName;
    /**
     * 通知级别
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_1, message = "通知级别的长度在0至1之间")
    @Pattern(regexp = Constants.NUMBER_EMPTY_RE, message = ("通知级别" + Constants.NUMBER_RE_MSG))
    private String noticeLevel;

    /**
     * 默认构造器。
     */
    public NoticeListParam() {
        super();
    }

    public String getNoticeCreatePerson() {
        return noticeCreatePerson;
    }

    public void setNoticeCreatePerson(String noticeCreatePerson) {
        this.noticeCreatePerson = noticeCreatePerson;
    }

    public String getNoticeName() {
        return noticeName;
    }

    public void setNoticeName(String noticeName) {
        this.noticeName = noticeName;
    }

    public String getNoticeLevel() {
        return noticeLevel;
    }

    public void setNoticeLevel(String noticeLevel) {
        this.noticeLevel = noticeLevel;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("NoticeListParam{");
        sb.append("startDate='").append(startDate).append('\'');
        sb.append(", noticeCreatePerson='").append(noticeCreatePerson).append('\'');
        sb.append(", iDisplayStart=").append(iDisplayStart);
        sb.append(", sEcho=").append(sEcho);
        sb.append(", endDate='").append(endDate).append('\'');
        sb.append(", noticeName='").append(noticeName).append('\'');
        sb.append(", iDisplayLength=").append(iDisplayLength);
        sb.append(", iColumns=").append(iColumns);
        sb.append(", noticeLevel='").append(noticeLevel).append('\'');
        sb.append(", iSortingCols=").append(iSortingCols);
        sb.append('}');
        return sb.toString();
    }
}